package Practice.Practice_02.LoginAndRegistration;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Account[] acc = new Account[20];
        Login log = new Login();
        Registration reg = new Registration();
        Inquire inq = new Inquire();
        String user = "admin";
        String pass = "123456";
        for (int i = 0; i < acc.length; i++) {
            if(i == 0){
                acc[0] = new Account(user,pass);
            }else{
                acc[i] = new Account("-1","-1");
            }
        }
        while(true) {
            System.out.println("请选择功能：" + "1-登录，2-注册，3-查看，4-退出");
            int choice = sc.nextInt();
            switch (choice) {
                case 1:
                    log.login(acc);
                    break;
                case 2:
                    reg.registration(acc);
                    break;
                case 3:
                    inq.inquire(acc);
                    break;
                case 4:
                    System.exit(0);
                default:
                    System.out.println("请重新输入！");
            }
        }
    }
}
